{/include file="simpla/common/header.html"/}
{/include file="simpla/common/left.html"/}
<div id="main-content">
  <h2>欢迎您 {/$_adminname/}</h2>
  <p id="page-intro">查看商品的销售明细。</p>
  <div class="clear"></div>
  <div class="content-box">
    <div class="content-box-header">
      <h3>销售明细</h3>
      <ul class="content-box-tabs">
        <li><a href="#tab1" class="default-tab">销售明细</a></li>
        <li><a href="{/get_url rule="/sales/sales"/}">商品销售</a></li>
        <li><a href="{/get_url rule="/sales/return"/}">商品退货</a></li>
      </ul>
      <div class="clear"></div>
    </div>
    <div class="content-box-content">
      <div class="tab-content default-tab" id="tab1">
        <div class="form">
          <form id="js-form" method="post" action="{/get_url rule='/sales/index'/}">
            <fieldset class="clearfix">
              <p> 销售类型：
                <input type="radio" value="all" name="type" {/if $type=='all'/}checked{//if/} />
                全部
                <input type="radio" value="yesid" name="type" {/if $type=='yesid'/}checked{//if/}  />
                会员购买
                <input type="radio" value="noid" name="type" {/if $type=='noid'/}checked{//if/}  />
                非会员购买
                <input type="radio" value="return" name="type" {/if $type=='return'/}checked{//if/}  />
                退货 </p>
              <p>开始时间： <span>
                <input type="text" value="{/$stime/}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="text-input min-input" name="stime" />
                </span>&nbsp;结束时间： <span>
                <input type="text" value="{/$etime/}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="text-input min-input" name="etime" />
                </span><small>(格式：2012-01-01)</small> </p>
              <p> 关  键  字 ：<span>
                <input type="text" value="{/$key/}" class="text-input small-input" name="key" />
                &nbsp;<small>商品名称，订单号，客户名字，会员卡号</small>&nbsp;
                <input type="submit" name="" id="button" class="button" value="查询" />
                </span> </p>
            </fieldset>
          </form>
        </div>
        <hr />
        <table>
          <thead>
            <tr>
              <th>订单号</th>
              <th>名称</th>
              <th>数量</th>
              <th>实际售价</th>
              <th>优惠(促销/会员)</th>
              <th>会员</th>
              <th>退款</th>
              <th>销售时间</th>
            </tr>
          </thead>
          <tfoot>
            <tr>
              <td colspan="7">{/$pagebar/}</td>
            </tr>
          </tfoot>
          <tbody>
          
          {/section name=i loop=$sales/}
          <tr>
            <td><a href="{/get_url rule='/sales/out-ac-p-oid'/}-{/$sales[i].order_id/}.html?ajax=1" class="ajax">{/$sales[i].order_id/}</a></td>
            <td>{/$sales[i].goods_name/}</td>
            <td>{/$sales[i].num/}</td>
            <td>{/$sales[i].price*$sales[i].num/}</td>
            <td>{/if $sales[i].p_discount gt 0/}{/$sales[i].p_discount /}元{/else/}无{//if/}/{/if $sales[i].m_discount gt 0/}{/$sales[i].m_discount /}元{/else/}无{//if/}</td>
             <td><a href="{/get_url rule='/member/memberinfo-mid/}-{/$sales[i].mid/}.html?ajax=1" title="查看购买记录" class="ajax">{/$sales[i].realname/}</a></td>
            <td>{/if $sales[i].refund_type eq 0/}无退款{/else/}{/$sales[i].refund_amount/}元{//if/}</td>
            <td>{/$sales[i].dateymd/}</td>
          </tr>
          {/sectionelse/}
          <tr>
            <td colspan="7" align="center">没有数据</td>
          </tr>
          {//section/}
            </tbody>
          
        </table>
      </div>
    </div>
  </div>
  {/include file="simpla/common/copy.html"/} </div>
{/include file="simpla/common/footer.html"/} 